package com.zt.english.bean

import com.google.gson.annotations.SerializedName

/**
 * 有道文本翻译返回json实体类封装
 */
class TextTranslateBean {

    /**
     * returnPhrase : ["good"]
     * query : good
     * errorCode : 0
     * l : en2zh-CHS
     * tSpeakUrl : http://openapi.youdao.com/ttsapi?q=%E5%A5%BD&amp;langType=zh-CHS&amp;sign=3CD5A4634D575B2A0901A3E3DAEA71A3&amp;salt=1609005489026&amp;voice=4&amp;format=mp3&amp;appKey=5ecc16e89f27fe79&amp;ttsVoiceStrict=false
     * web : [{"value":["好的","善","良好","商品"],"key":"good"},{"value":["早上好","早安","早晨好","鼓捣猫呢"],"key":"Good morning"},{"value":["永久地","永远","永恒地"],"key":"for good"}]
     * requestId : edb25ee1-5ec8-4573-9ef7-f7bdbad582a4
     * translation : ["好"]
     * dict : {"url":"yddict://m.youdao.com/dict?le=eng&amp;q=good"}
     * webdict : {"url":"http://m.youdao.com/dict?le=eng&amp;q=good"}
     * basic : {"exam_type":["初中","高中","CET4","CET6","考研"],"us-phonetic":"ɡʊd","phonetic":"ɡʊd","uk-phonetic":"ɡʊd","wfs":[{"wf":{"name":"比较级","value":"better"}},{"wf":{"name":"最高级","value":"best"}},{"wf":{"name":"复数","value":"goods"}}],"uk-speech":"http://openapi.youdao.com/ttsapi?q=good&amp;langType=en&amp;sign=23AEF35A8AA499C97CBA9009C0F69F79&amp;salt=1609005489026&amp;voice=5&amp;format=mp3&amp;appKey=5ecc16e89f27fe79&amp;ttsVoiceStrict=false","explains":["adj. 好的；优良的；愉快的；虔诚的","n. 好处；善行；慷慨的行为","adv. 好","n. (Good)人名；(英)古德；(瑞典)戈德"],"us-speech":"http://openapi.youdao.com/ttsapi?q=good&amp;langType=en&amp;sign=23AEF35A8AA499C97CBA9009C0F69F79&amp;salt=1609005489026&amp;voice=6&amp;format=mp3&amp;appKey=5ecc16e89f27fe79&amp;ttsVoiceStrict=false"}
     * isWord : true
     * speakUrl : http://openapi.youdao.com/ttsapi?q=good&amp;langType=en&amp;sign=23AEF35A8AA499C97CBA9009C0F69F79&amp;salt=1609005489026&amp;voice=4&amp;format=mp3&amp;appKey=5ecc16e89f27fe79&amp;ttsVoiceStrict=false
     */
    val query: String? = null

    val errorCode: String? = null

    val l: String? = null

    val tSpeakUrl: String? = null

    val requestId: String? = null

    val dict: DictDTO? = null

    val webdict: WebdictDTO? = null

    val basic: BasicDTO? = null

    val isWord: Boolean? = null

    val speakUrl: String? = null

    val returnPhrase: List<String>? = null

    val web: List<WebDTO>? = null

    val translation: List<String>? = null


    class DictDTO {
        /**
         * url : yddict://m.youdao.com/dict?le=eng&amp;q=good
         */
        val url: String? = null
    }


    class WebdictDTO {
        /**
         * url : http://m.youdao.com/dict?le=eng&amp;q=good
         */
        val url: String? = null
    }

    class BasicDTO {
        /**
         * exam_type : ["初中","高中","CET4","CET6","考研"]
         * us-phonetic : ɡʊd
         * phonetic : ɡʊd
         * uk-phonetic : ɡʊd
         * wfs : [{"wf":{"name":"比较级","value":"better"}},{"wf":{"name":"最高级","value":"best"}},{"wf":{"name":"复数","value":"goods"}}]
         * uk-speech : http://openapi.youdao.com/ttsapi?q=good&amp;langType=en&amp;sign=23AEF35A8AA499C97CBA9009C0F69F79&amp;salt=1609005489026&amp;voice=5&amp;format=mp3&amp;appKey=5ecc16e89f27fe79&amp;ttsVoiceStrict=false
         * explains : ["adj. 好的；优良的；愉快的；虔诚的","n. 好处；善行；慷慨的行为","adv. 好","n. (Good)人名；(英)古德；(瑞典)戈德"]
         * us-speech : http://openapi.youdao.com/ttsapi?q=good&amp;langType=en&amp;sign=23AEF35A8AA499C97CBA9009C0F69F79&amp;salt=1609005489026&amp;voice=6&amp;format=mp3&amp;appKey=5ecc16e89f27fe79&amp;ttsVoiceStrict=false
         */
        @SerializedName("us-phonetic")
        val usphonetic: String? = null
        val phonetic: String? = null
        @SerializedName("uk-phonetic")
        val ukphonetic: String? = null
        @SerializedName("uk-speech")
        val ukspeech: String? = null
        @SerializedName("us-speech")
        val usspeech: String? = null
        val exam_type: List<String>? = null
        val wfs: List<WfsDTO>? = null
        val explains: List<String>? = null

        class WfsDTO {
            /**
             * wf : {"name":"比较级","value":"better"}
             */
            val wf: WfDTO? = null

            class WfDTO {
                /**
                 * name : 比较级
                 * value : better
                 */
                val name: String? = null
                val value: String? = null
            }
        }
    }

    class WebDTO {
        /**
         * value : ["好的","善","良好","商品"]
         * key : good
         */
        val key: String? = null
        val value: List<String>? = null
    }

    override fun toString(): String {
        return "TextTranslateBean(query=$query, errorCode=$errorCode, l=$l, tSpeakUrl=$tSpeakUrl, requestId=$requestId, dict=$dict, webdict=$webdict, basic=$basic, isWord=$isWord, speakUrl=$speakUrl, returnPhrase=$returnPhrase, web=$web, translation=$translation)"
    }

}